
// CommunicateCommDlg.h : header file
//

#pragma once
#include "CommCommunicateThread.h"



// CCommunicateCommDlg dialog
class CCommunicateCommDlg : public CDialogEx
{
public:
	int m_nComArray[20];
	int m_nBoundRate[20];
	BOOL bConnectFlag;
	CommCommunicateThread *m_pCommThread;

	BYTE m_btOut1Sent[MAX_BUFF];
	BYTE m_btOut2AutoSent[MAX_BUFF];

	void QueryKey(HKEY hKey) ;
	int Str2Hex(PBYTE pOut, int nOutLen, PBYTE pIn, int nInLen);
// Construction
public:
	CCommunicateCommDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_COMMUNICATECOMM_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedBtConnect();
	afx_msg void OnBnClickedBtSet();
	afx_msg void OnBnClickedBtSent();
	afx_msg void OnBnClickedBtClear();
	afx_msg void OnCbnSelchangeCombCom();
	afx_msg void OnCbnSelchangeCombBote();
	afx_msg void OnClickedCheckTime();
	afx_msg void OnClickedCheckLen();
	afx_msg void OnClickedCheckAutoSent();
	afx_msg void OnClickedCheckRecive();
	CButton m_bt_clear;
	CButton m_bt_connect;
	CButton m_bt_sent;
	CButton m_bt_set;
	CButton m_ck_auto_sent;
	CButton m_ck_len;
	CButton m_ck_ox_sent;
	CButton m_ck_ox_show;
	CButton m_ck_recive;
	CButton m_ck_time;
	CComboBox m_cb_BoTe;
	CComboBox m_cb_com;
	CEdit m_EdOut1;
	CEdit m_EdOut2;
	CEdit m_EdTime;
	CListBox m_LsDataIn;
	CStatic m_StAutoSent;
	CStatic m_StComm;
	CButton m_StGroup;
	CStatic m_StInData;
	CStatic m_StOutData;
	CStatic m_StSet;
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	CButton m_CkAutoSentOX;
	afx_msg void OnClickedCheckOxAutoSent();
	afx_msg void OnChangeEtOutAutoSent();
	afx_msg void OnChangeEtOutSent();
	UINT m_nListBoxLen;
	int SetHorizontalExtent(void);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	int LayerFrm(void);
	BOOL m_bIsShow;
	BOOL m_bIsShowOX;
	BOOL m_bIsShowTime;
	BOOL m_bIsShowLen;
	int ShowInPutInfo(void);
	afx_msg void OnClickedCheckOxSent();
	afx_msg void OnClickedCheckOxShow();
};
